/**
 * Copyright (c) www.longdw.com
 */
package com.ldw.music.model;

import java.io.Serializable;
import java.util.List;
public class LyricModel implements Serializable {
	private static final long serialVersionUID = 1316511579773918698L;
	private List<SentenceModel> sentenceList;
	
	public LyricModel(List<SentenceModel> list)
	{
		this.sentenceList = list;
	}
	
	public List<SentenceModel> getSentenceList()
	{
		return sentenceList;
	}
	
	/**
	 * 寰楀埌褰撳墠姝ｅ湪鎾斁鐨勯偅涓�彞鐨勪笅鏍�涓嶅彲鑳芥壘涓嶅埌锛屽洜涓烘渶寮�ご瑕佸姞涓�彞 鑷繁鐨勫彞瀛�锛屾墍浠ュ姞浜嗕互鍚庡氨涓嶅彲鑳芥壘涓嶅埌浜�	 * 
	 * @return 涓嬫爣
	 */
	public int getNowSentenceIndex(long t) {
		for (int i = 0; i < sentenceList.size(); i++) {
			if (sentenceList.get(i).isInTime(t)) {
				return i;
			}
		}
		// throw new RuntimeException("绔熺劧鍑虹幇浜嗘壘涓嶅埌鐨勬儏鍐碉紒");
		return -1;
	}
}